' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2024.09.09.00.00]) on 2025.08.09 at 03:29 (Coordinated Universal Time)
' This program by Charlie Veniot draws the Acadian flag
_TITLE ("Drapeau acadien")
' π π π CONSTANTS π π π
' delay value to animate the flag's drawing
CONST zzz = 0.7
' flag colours
CONST π¨OR = _RGB( 255, 215, 0 ), _
π¦BLEU = _RGB( 0, 56, 150 ), _
β¬BLANC = _RGB( 255, 255, 255 ), _
π₯ROUGE = _RGB( 207, 20, 43 )
' flag dimensions
CONST FLAG_SCALE = 8, _
πW = 120 * FLAG_SCALE , _
πH = 72 * FLAG_SCALE
' star size and position
CONST star_size = πW / 9, _
star_x = πW / 6, _
star_y = πH / 3
' π π π ARRAYS π π π
' star points
DIM x%( 0 TO 4 )
DIM y%( 0 TO 4 )
' π π π MAIN PROGRAM π π π
SCREEN _NEWIMAGE( πW, πH, 32 )
GOSUB A100π¦_DrawTricolor
GOSUB A200β_DrawStar
SLEEP
END
' π π π SUBROUTINES π π π
A100π¦_DrawTricolor:
LINE ( 0, 0 ) TO ( πW / 3 - 1, πH - 1 ), π¦BLEU, BF : SLEEP zzz
LINE ( πW / 3 - 1, 0 ) TO ( πW / 3 * 2 - 1, πH - 1 ), β¬BLANC, BF : SLEEP zzz
LINE ( πW / 3 * 2 - 1, 0 ) TO ( πW - 1, πH - 1 ), π₯ROUGE, BF : SLEEP zzz
RETURN
A200β_DrawStar:
' Setup star's points
FOR a% = 0 TO 4
PRESET( star_x, star_y )
COLOR π¨OR
DRAW "TA " + ( a% * 72 ) + " BU" + star_size
x%( a% ) = POINT(0)
y%( a% ) = POINT(1)
NEXT a%
' Draw lines from points to relevant points
DRAW "BM" + x%(0) + "," + y%(0)
DRAW "M" + x%(2) + "," + y%(2) : SLEEP zzz
DRAW "M" + x%(4) + "," + y%(4) : SLEEP zzz
DRAW "M" + x%(1) + "," + y%(1) : SLEEP zzz
DRAW "M" + x%(3) + "," + y%(3) : SLEEP zzz
DRAW "M" + x%(0) + "," + y%(0) : SLEEP zzz
' Fill the resulting polygons
FOR a% = 0 TO 288 STEP 72
PRESET( star_x, star_y )
DRAW "TA " + a% + " BU" + ( star_size - 5 )
PAINT( POINT(0), POINT(1) ), π¨OR, π¨OR
SLEEP zzz
NEXT a%
PAINT( star_x, star_y ), π¨OR, π¨OR
RETURN